Skip to content

v6: Remove the legacy editor toolbar and corner logo#4398

Merged
trevor-scheer merged 14 commits into
graphiql-6from
trevor/remove-legacy-editor-chrome
Jul 11, 2026
Merged

v6: Remove the legacy editor toolbar and corner logo#4398
trevor-scheer merged 14 commits into
graphiql-6from
trevor/remove-legacy-editor-chrome

Conversation

@trevor-scheer

@trevor-scheer trevor-scheer commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove the legacy vertical editor toolbar and the floating "GraphiQL" corner logo. Branding now lives only in the top bar, and editor actions live only in the tab strip.
  • Move Merge Fragments, previously available only in the old toolbar, into the tab-strip actions alongside Prettify, Copy, and Save, so the action isn't lost.
  • The composable Toolbar/Logo render-prop slots still work for embedders. Only the default rendering is removed.
  • Enlarge the tab-strip action buttons so they're easier to click.
  • Position the action buttons at the right edge of the query editor instead of the far right of the response pane, so they stay next to the query and follow the editor/response divider as it's resized. The sessions area is split into an editor column and a response column divided by the drag bar; the tab strip lives in the editor column.

Test plan

  • Open GraphiQL. There's no floating vertical button column and no corner logo over the editor; branding appears once, in the top bar.
  • The tab strip shows Prettify, Merge Fragments, Copy, and Save, each exactly once.
  • The action buttons sit at the right edge of the query editor (by the editor/response divider), not over the response pane, and follow the divider when it's dragged.
  • Write a query that references a fragment, click Merge Fragments, and confirm the fragment gets inlined into the operation.
  • Prettify reformats the query, Copy copies it, and the single Run button in the top bar still executes it.
  • The Prettify, Merge, and Copy keyboard shortcuts still work.
  • The tab-strip action buttons read as comfortably sized, not cramped, and stay evenly spaced and aligned with the tab labels.

Refs: #4219

The v6 layout puts branding in the top bar and editor actions in the
tab strip, but the old vertical toolbar and corner logo still rendered
alongside them, so prettify and copy appeared twice and a second
"GraphiQL" logo floated over the editor. Drop the legacy chrome and
move Merge Fragments, which only lived in the old toolbar, into the
tab-strip actions so the action isn't lost.
@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e34bade

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
graphiql Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

The prettify/merge/copy/save buttons sat at the far right of the tab
strip, over the response pane — far from the query you're editing.
Split the sessions area into an editor column and a response column
divided by the drag bar, and move the tab strip into the editor column
so the actions land at the editor's right edge and follow the divider
as it's resized.
Reconcile the two-column sessions restructure with the flattened,
flush editor frame that landed on graphiql-6 (#4397, #4405):

- Drop the 8px inset on `.graphiql-session-row` so the panes sit flush
  to the frame edges, matching the inset-padding removal (#4405).
- Move the editor/response divider `border-right` from `.graphiql-editors`
  onto `.graphiql-editor-column` so it runs the full column height
  (header + editor) rather than only the editor body.
- Keep `min-height: 0` on `#graphiql-session`.
The editorFlex resize ref moved from .graphiql-editors onto the new
.graphiql-editor-column wrapper, so the panel-resizing test now reads
flexGrow from the column.
Drop the empty spacer above the response pane. The response header
(the JSON/Tree/Table view picker) now sits at the top of the column,
matched to the session header's height so it lines up with the tabs
and action buttons across the split.
Moving the editor/response resize onto the column wrappers left
`.graphiql-response` without a definite height, so it shrank to just
its header. The Tree/Table views still showed (intrinsic content
height), but the Monaco JSON result window is `flex: 1` of that
collapsed box and rendered at zero height — a blank JSON view. Give
`.graphiql-response` `flex: 1; min-height: 0` so it fills the column,
mirroring the editor side.
… header

Give the session header (tabs + actions) the elevated surface and bottom
divider the response header already uses, so both read as matching toolbar
strips across the split. Drop the response header's left padding so its
status/view-picker sits flush with the pane edge, like the tabs on the
editor side.
Two header-strip fixes:
- The tab strip carried its own shorter height + bottom border, which
  double-lined against the header divider. Stretch it to the full header
  height and drop its border so there's a single divider.
- The editor/response drag bar took 8px of layout width, pushing the
  response header off the divider. Make it straddle the divider (negative
  margins, unchanged width) so the response sits flush; the resize math
  reads the bar's clientWidth, which is untouched.
The editor/response and plugin/sessions resizers used a dedicated 8px-wide
drag bar (or, latterly, a straddling negative-margin hack), so they left a
gap or a bar floating over the divider and were inconsistent with each other.

Restyle `.graphiql-horizontal-drag-bar` as a sash: zero layout width so the
panes sit flush, an invisible 8px hit area (`::before`) straddling the seam,
and a 1px divider line (`::after`) that thickens on hover. Width 0 keeps the
resize math (which subtracts the bar's clientWidth) pixel-exact. The divider
is now drawn by the sash, so the editor-column `border-right` is dropped.
The col-resize cursor was only on the sash's ::before (unreliable on
pseudo-elements); move it onto the drag-bar element so it shows over the
hit area. Restore the response header's default horizontal padding so the
status dot no longer runs into the divider now that the pane is flush.
Resolve the query-editor conflict: keep PR 84's removal of the legacy
`.graphiql-toolbar` + `ExecuteButton` (Run lives in the top bar now), and
take graphiql-6's `QueryEditor` call, which drops the removed
`onClickReference` prop.
@trevor-scheer trevor-scheer marked this pull request as ready for review July 11, 2026 21:23
@trevor-scheer trevor-scheer merged commit cf0ebba into graphiql-6 Jul 11, 2026
13 checks passed
@trevor-scheer trevor-scheer deleted the trevor/remove-legacy-editor-chrome branch July 11, 2026 21:23
trevor-scheer added a commit that referenced this pull request Jul 11, 2026
PR 84 (#4398) removed the legacy editor toolbar, corner logo, and the
standalone execute-button dropdown, moving prettify/merge/copy/save into
the tab strip and the Run affordance into the top bar. The tab-order
walks in `keyboard.cy.ts` still asserted the old positions, and one test
still targeted the now-dead `.graphiql-execute-button` dropdown.

Rework the walks to assert each segment (top bar, rail, tab strip,
editor tools toggle, variables/headers, response pane) against the
current real labels/selectors, deriving the tab-strip action list from
the DOM instead of hardcoding a position count so unrelated toolbar
changes don't break it again. Replace the dead dropdown test with
coverage of the real current keyboard path for running one of several
named operations: placing the cursor in it and pressing Cmd/Ctrl-Enter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant